// 库存管理相关API
import request from "@/utils/request";

// 库存相关API
export const reverseApi = {
  // 获得采购入库分页
  // 查询采购入库作业分页
  getPoStockInMainPage: function (params) {
    return request({
      method: "get",
      url: "/wm/po-stock-in-main/page",
      params: params,
    });
  },

  // 获得采购入库明细
  getPoStockIn: function (params) {
    return request({
      method: "get",
      url: "/wm/po-stock-in-main/po-stock-in/page",
      params: params,
    });
  },

  //红冲入库
  reverseStockIn(data) {
    return request({
      url: "/wm/po-stock-in-main/po-stock-reverse/reverseIn",
      method: "post",
      data: data,
    });
  },

  //查询红冲入库记录
  getReverseInPage(params) {
    return request({
      url: "/wm/po-stock-reverse/reverseInPage",
      method: "get",
      params,
    });
  },

  // 查询领料出库主分页
  getPoStockOutMainPage: function (params) {
    return request({
      method: "get",
      url: "/wm/po-stock-out-main/page",
      params: params,
    });
  },
  // 获得采购出库
  getPoStockOut: function (params) {
    return request({
      method: "get",
      url: "/wm/po-stock-out-main/po-stock-out/page",
      params: params,
    });
  },

  // 红冲出库
  reverseStockOut(data) {
    return request({
      url: "/wm/po-stock-out-main/po-stock-reverse/create",
      method: "post",
      data,
    });
  },
  //查询红冲出库记录
  getReverseOutPage(params) {
    return request({
      url: "/wm/po-stock-reverse/reverseOutPage",
      method: "get",
      params,
    });
  },
  //查询入库主表数据
  poStockInMainPage(params) {
    return request({
      url: "/wm/po-stock-in-main/page",
      method: "get",
      params,
    });
  },
  //查询入库子表数据
  poStockInPage(params) {
    return request({
      url: "/wm/po-stock-in/page",
      method: "get",
      params,
    });
  },
};
export default reverseApi;
